package com.sdruixinggroup.mondayb2b.ui.fragments;

import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.sdruixinggroup.mondayb2b.R;
import com.sdruixinggroup.mondayb2b.ui.Activities.SystemMessageActivity;
import com.sdruixinggroup.mondayb2b.ui.MessageOneActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by 00029935 on 2017/11/17.
 */

public class MessageNoticeFragment extends BaseFragment {
    @BindView(R.id.ib_back)
    ImageView ibBack;
    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.tv_message)
    TextView tvMessage;
    @BindView(R.id.tv_count)
    TextView tvCount;
    @BindView(R.id.rl_dai)
    RelativeLayout rlDai;
    @BindView(R.id.tv_message_q)
    TextView tvMessageQ;
    @BindView(R.id.tv_count_t)
    TextView tvCountT;
    @BindView(R.id.rl_quan)
    RelativeLayout rlQuan;
    @BindView(R.id.tv_message_s)
    TextView tvMessageS;
    @BindView(R.id.tv_count_s)
    TextView tvCountS;
    @BindView(R.id.rl_system)
    RelativeLayout rlSystem;

    @Override
    protected int getInflateLayout() {
        return R.layout.message_notice_fragment;
    }

    @Override
    protected void setUpView(View view) {
        tvTitle.setText("消息通知");
        ibBack.setImageResource(R.mipmap.share_back);
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        // TODO: inflate a fragment view
        View rootView = super.onCreateView(inflater, container, savedInstanceState);
        ButterKnife.bind(this, rootView);
        return rootView;
    }

    @OnClick({R.id.ib_back, R.id.rl_dai, R.id.rl_quan,R.id.rl_system})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.ib_back:
                getActivity().finish();
                break;
            case R.id.rl_dai:
                Intent intent = new Intent(getContext(),MessageOneActivity.class);
                startActivity(intent);
                break;
            case R.id.rl_quan:
        /*        Intent intent2 = new Intent(getContext(),MessageOneActivity.class);
                startActivity(intent2);*/
                break;
            case R.id.rl_system:
                Intent intent3 = new Intent(getContext(),SystemMessageActivity.class);
                startActivity(intent3);
                break;
        }
    }
}
